DNS Server In CentOS
What is DNS?
DNS, or Domain Name System, is like the phone book of the internet. Its purpose is to translate human-friendly domain names (like www.example.com) into computer-readable IP addresses (such as 192.168.1.1).
- Domain Names: People find it easier to remember names like "google.com" than a series of numbers. These names are called domain names.
- IP Addresses: Every device connected to the internet has a unique numerical address called an IP address. Think of it like a phone number for computers.
- Translation: DNS acts as a translator between domain names and IP addresses. When you type a web address into your browser, DNS helps your computer find the correct IP address of the server hosting that website.
- Routing Traffic: Once your computer knows the IP address, it can send requests to the right server, and the server can respond with the web page or content you're looking for.
In essence, DNS makes it much simpler for us to navigate the internet by allowing us to use easy-to-remember domain names instead of having to memorize and type in complex IP addresses.
Type of DNS Servers
Most DNS servers are differentiated based on the role they play in terms of storing the resolution results or in how they work in relation to other DNS servers.
local name servers:
- Each ISP i.e,internet service provider, company has local (default) name server.Your computer's DNS query first goes to local name server.
Root Name Server:
- Contacted by local name server that cannot resolve domain name. Its role is to contact the authoritative name server if the resolution is not known. All DNS servers have IP addresses that connect to root name servers. It then returns the result from the authoritative name server and passes it back to the local name server.
Authoritative Name Server
- For a given host, it stores that host’s IP address, name combination. It can perform name/address translation for that host’s name
Cache DNS Server Role
- Every Linux DNS server has a default configuration that allows it to be a Cache DNS server. This server does not have any database (configuration / translation files) that would be used to translate computer names into IP numbers. Instead it has a configuration file with IP addressess of selected ROOT servers. Any DNS request sent to the Linux server is passed to one of the ROOT servers and its response is stored in cache memory. If any other computer in the network requests the same name, the Cache DNS Server will use the cached information, speeding up the translation process.
In this tutorial, I will show how to install and configure your own DNS server in Centos 9 Linux